<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ include file="cfmt/tldImport.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>会员帐号充值</title>
<script language="javascript" src="js/page.js"> </script>
<link  href="css/style.css"  rel="stylesheet" type="text/css"/>

</head>
<body>
<script>
	function intos()
	{
		document.getElementById("DIV").style.display="block";
		return;
	}
	function Upinto(id)
	{
		document.getElementById("UpDIV").style.display="block";
		//为影藏域赋值
		document.getElementById("CardTypeId").value=id;
		form1.action="CardTypesGuanliServlet";
		form1.submit();
	}
	
</script>
<div  class="page1">
<form action="AdminServlet?choose=4&type=1" method="post" name="form1">
<div align="center" style="margin-top: 50px;">输入卡名关键字
<input type="text" name="CardTypeName"/>
<input type="submit" name="Submint1" value="查 询"/>
<input type="button" name="Submint2" value="添加" onclick="intos()"/>
</div>
</form>

<!--添加显示 -->
<div style="display:none;" id="DIV">
<form action="AdminServlet?choose=4&type=2" method="post" name="form1">
<div style="margin-left: 157px;">输入卡片的名称
<input type="text" name="CardTypeName"/></div>
<div style="margin-left: 157px;">输入卡销售面值
<input type="text" name="price"/></div>
<div style="margin-left: 157px;">输入引用卡位置
<input type="file" name="URL"/></div>
<div style="margin-left:500px;"><input type="submit" name="Submint2" value="提交"/></div>
</form>
</div>
<!--修改显示 -->
<div style="display:none;" id="UpDIV">
<form action="CardTypesGuanliServlet" method="post" name="form1">
<div style="margin-left: 157px;">输入卡片的名称
<input type="text" name="CardTypeName"/></div>
<div style="margin-left: 157px;">输入卡销售面值
<input type="text" name="price"/></div>
<div style="margin-left: 157px;">输入引用卡位置
<input type="file" name="URL"/></div>
<input type="hidden" id="CardTypeId" name="CardTypeId"/>
<div style="margin-left:500px;"><input type="submit" name="Submint2" value="提交"/></div>
</form>
</div>

<table width="300px" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="cs">编号11</td>
    <td class="cs">名称</td>
    <td class="cs">面值</td>
    <td class="cs">操作</td>
  </tr>
  
	<c:forEach var="card" items="${CardType}">
		 <tr>
	    <td>${card.id}</td>
	    <td>${card.cardTypeName}</td>
	    <td>${card.cardPrice}</td>
	    <td  style="font-size:16px;">
	    <a href="#" onclick="Upinto(${card.id})">修改</a>
	    <a href="AdminGuanliServlet?choose=5&Id=${card.id}">删除</a>
	    </td>
	    </tr>
	</c:forEach>
	
</table>
</div>
</body>
</html>
